package org.jash.demo02.ui

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavController
import kotlinx.serialization.Serializable

@Serializable
data object P01

@Composable
fun Page01(modifier: Modifier, controller: NavController) {
    Column(modifier = modifier) {

        Text("第一个页面")
        Text("去第二个页面",
            modifier = Modifier.clickable(true) {
                controller.navigate(P02)
            })
        Text("返回",
            modifier = Modifier.clickable(true) {
                controller.popBackStack()
            })
    }
}